package main

type LinkedList struct {
	Value int
	Next  *LinkedList
}

// a--->b--->c
func (ll LinkedList) revise(head *LinkedList) *LinkedList {
	var pre *LinkedList = nil
	var next *LinkedList = nil

	for head != nil {
		next = head.Next
		head.Next = pre
		pre = head
		head = next
	}
	return pre
}
